home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
3565-4.665
/
dmg-4625
/
tutorial._12
/
l8.asc
< prev
next >
Wrap
Text File
|
1987-04-21
|
1KB
|
30 lines
10 rem ------------------------------
20 rem ----- -----
30 rem ----- SPRITE TESTER 4 -----
40 rem ----- -----
50 rem ------------------------------
60 cls : key off : curs off : hide on
70 if mode<>0 then mode 0
80 if length(1)=0 then load "lander.mbs"
90 print "Press a Key to Quit"
100 locate 0,5 : centre "Joystick Moves Sprite"
110 SPX=rnd(300)+10 : SPY=rnd(180)+10 : SPR=1 : MV=1
120 sprite 1,SPX,SPY,SPR
130 K$=""
140 repeat
150 K$=inkey$
160 until joy<>0 or K$<>""
170 if K$<>"" then goto 290
180 if joy=1 then SPY=SPY-MV : SPR=1
190 if joy=2 then SPY=SPY+MV : SPR=5
200 if joy=4 then SPX=SPX-MV : SPR=7
210 if joy=8 then SPX=SPX+MV : SPR=3
220 if joy=5 then SPY=SPY-MV : SPX=SPX-MV : SPR=8
230 if joy=9 then SPY=SPY-MV : SPX=SPX+1 : SPR=2
240 if joy=6 then SPY=SPY+MV : SPX=SPX-MV : SPR=6
250 if joy=10 then SPY=SPY+MV : SPX=SPX+1 : SPR=4
260 if joy>=16 then boom : wait 10
270 sprite 1,SPX,SPY,SPR
280 goto 130
290 default : end